// 定义分类相关的API接口函数
import request from '@/utils/request'
// 获取所有分类(顶级，二级，对应的商品推荐数据)
export const findAllCategory = () => {
  return request('/home/category/head', 'get')
}
// 获取单个顶级分类信息(id)
export const findTopCategory = (id) => {
  return request('/category', 'get', { id })
}
// 获取二级分类筛选条件数据
export const findSubCategoryFilter = (id) => {
  return request('/category/sub/filter', 'get', { id })
}
// 获取二级分类筛选条件下的商品数据
export const findSubCategoryGoods = (params) => {
  return request('/category/goods', 'post', params)
}
